<?php

use yii\helpers\Url;

?>

<div class="row">
<div class="col-md-12">
    	 <div class="panel panel-info">
    	 <div class="panel-heading">用户查找</div>
    	 <div class="panel-body">
        	<form class="form-inline" action="<?= Url::toRoute(['business/member','admin_id'=>Yii::$app->request->get('admin_id')]) ?>" method="post" target="_blank">
              <div class="form-group">
                <label for="user_id">用户id</label>
                <input type="text" class="form-control" id="user_id" placeholder="用户id" name="user_id">
              </div>
              <div class="form-group">
                <label for="business_username">用户phone</label>
                <input type="text" class="form-control" id="user_phone" placeholder="用户phone" name="user_phone">
              </div>
              <button type="submit" class="btn btn-info">查询</button>
            </form>
            </div>
        </div>
    </div>

            <div class="col-md-12">
    	 <div class="panel panel-success">
    	 <div class="panel-heading">快捷查找</div>
    	 <div class="panel-body">
				<table class="table table-bordered">
					 <tr>
                    	<td>
                    		<a class="btn btn-success btn-sm" target="_blank" href="<?= Url::toRoute(['business/channels','admin_id'=>Yii::$app->request->get('admin_id')])?>">渠道推广</a>
                    	</td>
                    </tr>
				</table>
            </div>
        </div>
    </div>

	<div class="col-md-12">
		
		    <div class="panel panel-primary">
        <div class="panel-heading">business</div>
        <div class="panel-body">
            
                
                <?php 
                    if ($business) :
                    foreach ($business as $key => $val) :
                ?>
                <table class="table table-bordered">
            	<tbody>
                <tr>
                	<th>商户id</th> <td><?= $val['id']?></td>
                    <th>商户username</th><td><?= $val['username'] ?></td>
                    <th>商户标识</th> <td><?= $val['weichat_id'] ?></td>
                    <th>是否开启独立</th> <td><?= $val['is_alone'] ?></td>
                    <th><a class="btn btn-primary btn-sm" target="_blank" href="<?= Url::toRoute(['balance/detail', 'admin_id' => $val['id']])?>">消费明细</a></td>
                </tr>
                 </tbody>
            </table>
                <?php
                    endforeach;
                    endif;
                ?>
                
           
        </div>
    </div>
		
		
	</div>
</div>